package edu.sfsu.powerrangers.jeopardy.gamestate;

import java.io.Serializable;
import java.util.Vector;

public class Game extends Vector<Round> implements Cloneable, Serializable {
	private static final long serialVersionUID = 1L;
	
	private String name;
	private String description;
	private FinalRound finalRound;
	
	public Game(String name, String description) {
		this.name = name;
		this.description = description;
		this.finalRound = null;
	}
	
	public Game clone() {
		Game g = new Game(name, description);
		for (Round r : this) g.add(r.clone());
		if (this.finalRound != null) g.finalRound = this.finalRound.clone();
		return g;
	}
	
	public String getName() {
		return name;
	}
	
	public String getDescription() {
		return description;
	}
	
	public boolean containsFinalRound() {
		return finalRound != null;
	}
	
	public FinalRound getFinalRound() {
		return finalRound;
	}
	
	public void setFinalRound(FinalRound finalRound) {
		this.finalRound = finalRound;
	}
}
